#ifndef RENDERAREA_H
#define RENDERAREA_H

#include <QtGui>
#include <vector>

#include "common.h"
#include "mathbox.h"

class RenderArea : public QWidget
{
	Q_OBJECT

public:
	RenderArea(QWidget *parent = 0);
	~RenderArea();
	QSize minimumSizeHint() const;
    QSize sizeHint() const;

protected:
    void paintEvent(QPaintEvent *event);
	void timerEvent(QTimerEvent *event);

private:
	void drawShip(QPainter& painter);

private:
	QPen pen;
	Ship* ship;
	Water* water;
	MathBox* box;
	std::vector<ShipCoord> shipTrace;
	short traceCounter;
	QPainterPath shipPath;
};

#endif // RENDERAREA_H
